# Contributor: Ashley Sommer <ashleysommer@gmail.com>
# Maintainer: Ashley Sommer <ashleysommer@gmail.com>
pkgname=libfastjson
pkgver=0.99.9
pkgrel=0
pkgdesc="fork of the json-c library for rsyslog, optimized for liblognorm processing."
url="https://www.rsyslog.com/"
arch="all"
license="MIT"
makedepends="autoconf automake libtool"
subpackages="$pkgname-dev $pkgname-dbg"
source="$pkgname-$pkgver.tar.gz::https://github.com/rsyslog/libfastjson/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="d32d949465dcc94d04be6cd0e1cf78e5653bbbef7e2bd148079a5f4d69102febabd1fe8af668e344b82c62a918d1cc6c9f39a203d65cb1d81409a6d400a63d6a  libfastjson-0.99.9.tar.gz"
